package com.king.juc.ync;


import lombok.extern.slf4j.Slf4j;

/**
 * 异步，不等待
 * @author king
 * @date 2020/9/1 13:42
 */
@Slf4j(topic = "c.Async")
public class Async {
    public static void main(String[] args) {

        new Thread(() -> {
            int i = 1;
            int count = 100000;
            long start = System.currentTimeMillis();
            while(i < count){ ++i; }
            log.debug("time: " + (System.currentTimeMillis() - start));
        }).start();

        log.debug("异步运行");
    }
}
